﻿//----------------------------------------------------------------
// Desc: windows
// Edit: ShowLong, http://blog.csdn.net/showlong
//
// Date Created: 2012-04-04
//
// Update Date : 
//
// Copyright (c) Fuel4D (http://www.fuel4d.com), All rights reserved.
//
//----------------------------------------------------------------
#pragma once


#if FUEL_WND_ANDROID


class FWnd_android : public IFWnd
{
    FDECLARE_CLASS(FWnd_android)

public:
    FWnd_android();
    virtual~FWnd_android();

    virtual bool GetActive();
    virtual bool GetMinimized();
    virtual HWND GetHwnd();
    virtual HINSTANCE GetHinstance();
    virtual bool Initialize(FEngineParameter* param);
    virtual bool Run();
    virtual void Release();
    virtual void __GetCliRect(RECT& rc);
    virtual void __GetCurPos(POINT& pt);
    virtual void __ReSize(WORD w, WORD h, bool center);
    virtual void __ToWndCenter(RECT& rc);
    virtual void __Quit();

    bool androidIsInit;
    IFEngine* fge;
    bool androidActived;

    FINPUT_PACKAGE andorid_input;   // 输入事件转发包
};

// 以下接口由JNI主动调用，请勿手动调用
extern void FAppCreate_android(jobject asset_mgr, jstring apk_path, jstring apk_files, jstring apk_cache, const ACHAR* cls_name);
extern void FAppDestory_android();
extern void FAppPause_android();
extern void FAppResume_android();
extern void FAppDeviceCreate_android();
extern void FAppDeviceRun_android();
extern void FAppDeviceLost_android();
extern void FAppDeviceReset_android(int w, int h);
extern bool FAppCursor_android(jint type, jfloat x, jfloat y);
extern bool FAppKeyEvent_android(jint type, jint key);
extern void FAppInputResult_android(jint id1, jint id2, jstring txt);
extern void FAppWebJump_android(jstring url);

#endif
